﻿using System;
using System.Collections.Generic;
using System.Text;

namespace PixentrationEngine
{
    public class ScoreEntry : IComparable<ScoreEntry>
    {
        protected string name;
        protected int score;
        protected string time;
        protected String dateFormat = "yyyy-MM-dd HH:mm";

        public ScoreEntry()
        {
            time = DateTime.Now.ToString();
        }

        public String Name
        {
            get
            {
                return name;
            }

            set
            {
                name = value;
            }
        }


        public int Score
        {

            get
            {
                return score;
            }

            set
            {
                score = value;
            }

        }


        public String Time
        {

            get
            {
                return time;
            }

            set
            {
                time = value;
            }

        }


        public String DateFormat
        {

            get
            {
                return dateFormat;
            }

            set
            {
                dateFormat = value;
            }

        }


        public int CompareTo(ScoreEntry entry)
        {
            // Multiplying Score.CompareTo(entry.Score) by -1
            // sorts the list in descending order.
            return -1 * Score.CompareTo(entry.Score);
        }

    }

}
